package com.javasm.crm.mapper.repository;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.javasm.crm.domin.entity.repository.Outrepogoods;
import com.javasm.crm.domin.vo.repository.OutrepogoodsVO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lirui
 * @since 2021-07-17
 */
public interface OutrepogoodsMapper extends BaseMapper<Outrepogoods> {

    @Select("SELECT afgs.*, rpgs.good_outimei " +
            "FROM aftersale_refacoutgoods afgs LEFT JOIN repository_outrepogoods rpgs" +
            " on afgs.good_imei = rpgs.good_imei"+
            " ${ew.customSqlSegment}")
    List<OutrepogoodsVO> getOutrepogoodsVO(@Param(Constants.WRAPPER) QueryWrapper<OutrepogoodsVO> queryWrapper);
}
